home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKitArchive.mbox / mbox / 000240_misckit-reques…aska.et.byu.edu_Tue Jul 5 11:29:15 1994.msg < prev    next >
Internet Message Format  |  1994-10-30  |  4KB

  1. Return-Path: <misckit-request@alaska.et.byu.edu>
  2. Received: from alaska.et.byu.edu by darth.byu.edu (NX5.67d/NX3.0M)
  3.     id AA01728; Tue, 5 Jul 94 11:28:56 -0600
  4. Received: from YVAX2.BYU.EDU by alaska.et.byu.edu; Tue, 5 Jul 1994 07:43:27 -0600
  5. Received: from DIRECTORY-DAEMON by yvax.byu.edu (PMDF V4.3-7 #7277)
  6.  id <01HEC8HGE1TS0Q81BR@yvax.byu.edu>; Tue, 5 Jul 1994 07:43:10 MDT
  7. Received: from alaska.et.byu.edu by yvax.byu.edu (PMDF V4.3-7 #7277)
  8.  id <01HEC8HD1JA8HTTMOV@yvax.byu.edu>; Tue, 5 Jul 1994 07:43:05 MDT
  9. Received: from YVAX2.BYU.EDU by alaska.et.byu.edu; Tue,
  10.  5 Jul 1994 07:40:30 -0600
  11. Received: from DIRECTORY-DAEMON by yvax.byu.edu (PMDF V4.3-7 #7277)
  12.  id <01HEC8DR2WB48ZI52H@yvax.byu.edu>; Tue, 5 Jul 1994 07:40:10 MDT
  13. Received: from NeXT.COM by yvax.byu.edu (PMDF V4.3-7 #7277)
  14.  id <01HEC8DOB0UOHTTIQL@yvax.byu.edu>; Tue, 5 Jul 1994 07:40:07 MDT
  15. Received: from zone by oz.NeXT.COM (NX5.67e/NeXT0.1-Aleph-bf) id AA23504; Tue,
  16.  5 Jul 94 06:37:53 -0700
  17. Received: from NeXT-Mail-2 (0.0) by zone.next.com (NX5.67d/NX3.0X)
  18.  id AA18661; Tue, 5 Jul 94 06:37:51 -0700
  19. Date: Tue, 05 Jul 1994 06:37:23 -0700
  20. From: Ali_Ozer@NeXT.COM (Ali Ozer)
  21. Subject: Re: Foundation and Misc
  22. In-Reply-To: <199407032117.AA03794@trwlasd.com>
  23. To: tomi@shinto.nbg.sub.org, bruce@trwlasd.com, don@darth.byu.edu,
  24.         andrew@stone.com, miscstring@byu.edu
  25. Cc: misckit@byu.edu
  26. Message-Id: <9407051337.AA23504@oz.NeXT.COM>
  27. Content-Transfer-Encoding: 7BIT
  28. In-Reply-To-Doc: hNynDPeFQSfgVuf3WP0L1ci2Qk
  29. X-Next-Documentid: zvrWhwG8fy8Epvy9srZA9jlwSj
  30.  
  31. Another option is to add the rich set of MiscString methods to NSString via  
  32. categories. The advantage of this approach would be that MiscString and  
  33. NSString would be interchangeable, and any NSString, even one created and  
  34. returned by the kit would respond to MiscString methods, avoiding consumers  
  35. from having to create MiscStrings from NSStrings all over the place. Also  
  36. you would not have to deal with Unicode issues.
  37.  
  38. I can think of two disadvantages to this:
  39. 1. Performance: These methods would have to go through NSString's primitives
  40. 2. You lose any state MiscString has which NSString doesn't
  41.  
  42. #1 isn't so bad. After all, once all these methods are added to NSString,  
  43. you can then make subclasses of NSString & NSMutableString available which  
  44. implement most of these methods efficiently (even if it's just for the case  
  45. where the characters are 8-bit; otherwise NSString takes over). Turns out  
  46. you already have this implementation in MiscString.
  47.  
  48. #2 isn't so bad either: The only additional state added by MiscString is the  
  49. string ordering table, and most consumers of MiscString probably don't use  
  50. this.
  51.  
  52. Ali
  53.  
  54.  
  55. Begin forwarded message:
  56.  
  57. From: Bruce McKenzie <bruce@trwlasd.com>
  58. Date: 1994-07-03 14:17:51 -0700
  59. To: tsengel@cip.informatik.uni-erlangen.de
  60. Subject: Re: Foundation and Misc
  61. Cc: misckit@byu.edu, miscstring@byu.edu
  62. content-transfer-encoding: 7BIT
  63.  
  64. > MiscString.... Hmm  ok what about making it a subclass of
  65. > NSString an add the missing methods + maybe some
  66. > compatibility stuff for the first time. If the MiscKit would
  67. > define a dummy NSString tomorrow we could start switching to
  68. > the NSString where sufficient. And places that need more
  69. > functionallity could be converted to Misc .... and would
  70. > remain Misc in 4.0. It would be nice to use NSString really
  71. > soon because methods should use it heavily for casting. If we
  72. > have it all Misc.. We can distinguish later where NSString is
  73. > sufficient and where MiscString really is required as an
  74. > argument.
  75.  
  76. I'd recommend a different approach. Define a new class 'MiscStringNew'  
  77. (excuse me, I'm onomatopoetically challenged) that is the subclass of  
  78. NSString. Add the behaviour to it, and allow MiscString to wither (bug fixes  
  79. only) until the world is using MiscStringNew.
  80.  
  81. I think a critical part of this migration is the separation and refinement  
  82. of the API. Currently, MiscString is a kitchen sink of a class. There's a  
  83. lot of great stuff there, but it is neither complete nor consistent in its  
  84. offerings (e.g. you can search for chars in 37,000,000 ways, but there is  
  85. limited support for *non regex* string searching).
  86.  
  87. Bruce
  88. ---
  89. Bruce McKenzie (spuds@netcom.com, NeXTMail welcome)
  90. Atlas Software Ventures, Inc.
  91. PO Box 1299, Santa Clara, CA 95052-1299
  92. 800/278-9909 (ASV-9909)
  93. *** Software Development, specializing in NEXTSTEP ***
  94. ---